<!DOCTYPE html>
<html lang="zh-CN" style="height:100%;overflow:hidden;">
<head>
  <meta charset="UTF-8">
  <meta name="renderer" content="webkit"/>
  <meta name="force-rendering" content="webkit"/>
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <title>单向历</title>
  <style>
    #rili{height:100%;overflow:hidden;background:#efefef;}
    #rili img{height:100%;overflow:hidden;margin:0 auto;display:block;max-height:100% !important;max-width:100% !important;}
    @media (max-width:691px) {
      #rili img{height:auto;width:100%;}
    }
  </style>
</head>
<body id="rili">
  <img  src="https://www.aigeek.top/api/rili.php">
</body>
<script>
function setRegular(targetHour){
  var timeInterval,nowTime,nowSeconds,targetSeconds
  nowTime = new Date()
  nowSeconds = nowTime.getHours() * 3600 + nowTime.getMinutes() * 60 + nowTime.getSeconds()
  targetSeconds =  targetHour * 3600
  //  判断是否已超过今日目标小时，若超过，时间间隔设置为距离明天目标小时的距离
  timeInterval = targetSeconds > nowSeconds ? targetSeconds - nowSeconds: targetSeconds + 24 * 3600 - nowSeconds 
  setTimeout(getProductFileList,timeInterval * 1000)
}
function getProductFileList(){
  window.location.reload();
  setTimeout(getProductFileList,24*3600 * 1000)
}
setRegular(7);//比如目标是每天早上7点
</script>
</html>